package com.woniu.hospital.service.impl;

import com.woniu.hospital.domain.SurgicalDesc;
import com.woniu.hospital.mapper.SurgicalDescMapper;
import com.woniu.hospital.service.ISurgicalDescService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
 * 手术详情表Service业务层处理
 * 
 * @author wolf-six
 * @date 2023-02-15
 */
@Service
public class SurgicalDescServiceImpl implements ISurgicalDescService {
    @Autowired
    private SurgicalDescMapper surgicalDescMapper;

    /**
     * 查询手术详情表
     * 
     * @param surgicalDescid 手术详情表主键
     * @return 手术详情表
     */
    @Override
    public SurgicalDesc selectSurgicalDescBySurgicalDescid(Long surgicalDescid)
    {
        return surgicalDescMapper.selectSurgicalDescBySurgicalDescid(surgicalDescid);
    }

    /**
     * 查询手术详情表列表
     * 
     * @param surgicalDesc 手术详情表
     * @return 手术详情表
     */
    @Override
    public List<SurgicalDesc> selectSurgicalDescList(SurgicalDesc surgicalDesc)
    {
        return surgicalDescMapper.selectSurgicalDescList(surgicalDesc);
    }

    /**
     * 新增手术详情表
     * 
     * @param surgicalDesc 手术详情表
     * @return 结果
     */
    @Override
    public int insertSurgicalDesc(SurgicalDesc surgicalDesc)
    {
        return surgicalDescMapper.insertSurgicalDesc(surgicalDesc);
    }

    /**
     * 修改手术详情表
     * 
     * @param surgicalDesc 手术详情表
     * @return 结果
     */
    @Override
    public int updateSurgicalDesc(SurgicalDesc surgicalDesc)
    {
        return surgicalDescMapper.updateSurgicalDesc(surgicalDesc);
    }

    /**
     * 批量删除手术详情表
     * 
     * @param surgicalDescids 需要删除的手术详情表主键
     * @return 结果
     */
    @Override
    public int deleteSurgicalDescBySurgicalDescids(Long[] surgicalDescids)
    {
        return surgicalDescMapper.deleteSurgicalDescBySurgicalDescids(surgicalDescids);
    }

    /**
     * 删除手术详情表信息
     * 
     * @param surgicalDescid 手术详情表主键
     * @return 结果
     */
    @Override
    public int deleteSurgicalDescBySurgicalDescid(Long surgicalDescid)
    {
        return surgicalDescMapper.deleteSurgicalDescBySurgicalDescid(surgicalDescid);
    }

    @Override
    public BigDecimal surgeryCost(Long patientId) {
        return surgicalDescMapper.surgeryCost(patientId);
    }
}
